home *** CD-ROM | disk | FTP | other *** search
/ Linux Cubed Series 4: GNU Archives / Linux Cubed Series 4 - GNU Archives.iso / gnu / inetutil.1 / inetutil / inetutils-1.1 / Makefile.in < prev    next >
Encoding:
Makefile  |  1996-07-24  |  2.7 KB  |  84 lines

  1. # Makefile for inetutils
  2. #
  3. # Copyright (C) 1995, 1996 Free Software Foundation, Inc.
  4. #
  5. # This program is free software; you can redistribute it and/or modify
  6. # it under the terms of the GNU General Public License as published by
  7. # the Free Software Foundation; either version 2, or (at your option)
  8. # any later version.
  9. #
  10. # This program is distributed in the hope that it will be useful,
  11. # but WITHOUT ANY WARRANTY; without even the implied warranty of
  12. # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  13. # GNU General Public License for more details.
  14. #
  15. # You should have received a copy of the GNU General Public License
  16. # along with this program; if not, write to the Free Software
  17. # Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  18. #
  19.  
  20. SHELL = /bin/sh
  21.  
  22. srcdir = @srcdir@
  23. top_srcdir = @top_srcdir@
  24. include config.make
  25.  
  26. SUBDIRS = @SUBDIRS@
  27. SERVERS = @COMMON@ @SERVERS@
  28. CLIENTS = @COMMON@ @CLIENTS@
  29. BOTH = @COMMON@ @SERVERS_OR_CLIENTS@
  30.  
  31. DISTFILES = ChangeLog INSTALL NEWS README config.guess \
  32.     config.make.in config.sub configure configure.in install-sh \
  33.     mkinstalldirs rules.make
  34. MAINTCLEAN = configure
  35.  
  36. DISTCLEAN = include config.make config.status config.log Makefile
  37.  
  38. all:       $(addsuffix -all,$(BOTH))
  39. install:   install-both
  40. uninstall: uninstall-both
  41. clients:   $(addsuffix -all,$(CLIENTS))
  42. servers:   $(addsuffix -all,$(SERVERS))
  43.  
  44. clean: clean-subdirs
  45. distclean: distclean-subdirs
  46.     $(RM) -rf $(DISTCLEAN)
  47. maintainer-clean: maintainer-clean-subdirs
  48.     $(RM) -rf $(DISTCLEAN) $(MAINTCLEAN)
  49.  
  50. %-clients: $(addprefix %-,$(CLIENTS))    ;
  51. %-servers: $(addprefix %-,$(SERVERS))    ;
  52. %-both:    $(addprefix %-,$(BOTH))    ;
  53. %-subdirs: $(addprefix %-,$(SUBDIRS))    ;
  54.  
  55. $(addsuffix -all,$(SUBDIRS))       : %-all       : ; $(MAKE) -C $* all
  56. $(addprefix install-,$(SUBDIRS))   : install-%   : ; $(MAKE) -C $* install
  57. $(addprefix uninstall-,$(SUBDIRS)) : uninstall-% : ; $(MAKE) -C $* uninstall
  58. $(addprefix clean-,$(SUBDIRS))     : clean-%     : ; $(MAKE) -C $* clean
  59. $(addprefix distclean-,$(SUBDIRS)) : distclean-% : ; $(MAKE) -C $* distclean
  60. $(addprefix maintainer-clean-,$(SUBDIRS)) : maintainer-clean-% : ; $(MAKE) -C $* maintainer-clean
  61.  
  62. $(addprefix dist-,$(SUBDIRS))      : dist-%      :
  63.     $(MAKE) -C $* dist DISTDIR=../$(DISTDIR)/$*
  64.  
  65. dist: $(DISTFILES) dist-prepare dist-subdirs dist-package
  66.  
  67. DISTDIR = `cat distname`
  68. distname: libinetutils/version.c
  69.     echo inetutils-`sed -e '/inetutils_version/!d' \
  70.         -e 's/[^0-9.]*\([0-9.a-z]*\).*/\1/' -e q $<` > $@-tmp
  71.     mv $@-tmp $@
  72. dist-prepare: distname
  73.     rm -rf $(DISTDIR)
  74.     mkdir $(DISTDIR)
  75.     @for subdir in $(SUBDIRS); do \
  76.       echo mkdir $(DISTDIR)/$$subdir; mkdir $(DISTDIR)/$$subdir || exit 1; \
  77.     done
  78.     $(LINK_DISTFILES)
  79. dist-package: distname
  80.     tar --gzip -chvf $(DISTDIR).tar.gz $(DISTDIR)
  81.     rm -rf $(DISTDIR) distname
  82.  
  83. .PHONY: clients servers both subdirs
  84.